package cn.zs.supply.common.core.mq;

import cn.zs.supply.common.constants.PubKeyDef;
import cn.zs.supply.common.core.context.RibbonFilterContextHolder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

@Data
@ToString
@EqualsAndHashCode
public class BaseMQMsg {
    private String traceId;
    private Boolean isFromGrayReq;

    public BaseMQMsg() {
        if ("true".equals(RibbonFilterContextHolder.getCurrentContext().get(PubKeyDef.GRAY_TAG))) {
            isFromGrayReq = true;
        } else {
            isFromGrayReq = false;
        }
    }

}
